package cn.ac.cintcm.synonymous;

public class NameField {
    /**
     * 
     */
    private static final long serialVersionUID = -8560949062375381399L;
    private short id;
    private String name;

    public NameField() {
        
    }
    public NameField(short id, String name) {
        this.id = id;
        this.name = name;
    }
    
    public short getId() {
        return id;
    }
    public void setId(short id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    @Override
    public int hashCode() {
        final int PRIME = 31;
        int result = 1;
        result = PRIME * result + ((name == null) ? 0 : name.hashCode());
        return result;
    }
    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        final NameField other = (NameField) obj;
        if (name == null) {
            if (other.name != null)
                return false;
        } else if (!name.equals(other.name))
            return false;
        return true;
    }
    
}
